{
    "cells": [
        {
            "cell_type": "markdown",
            "metadata": {},
            "source": [
                "# Prerequisites\n",
                "\n",
                "pip install bqplot"
            ],
            "execution_count": null,
            "outputs": []
        },
        {
            "cell_type": "code",
            "execution_count": 126,
            "metadata": {},
            "outputs": [],
            "source": [
                "import numpy as np\n",
                "from bqplot import pyplot as plt\n",
                "\n",
                "# And creating some random data\n",
                "size = 100\n",
                "np.random.seed(0)\n",
                "x_data = np.arange(size)\n",
                "y_data = np.cumsum(np.random.randn(size)  * 100.0)"
            ]
        },
        {
            "cell_type": "code",
            "execution_count": 127,
            "metadata": {},
            "outputs": [],
            "source": [
                "plt.figure(title='My First Plot')\n",
                "plt.plot(x_data, y_data)\n",
                "plt.show()"
            ]
        },
        {
            "cell_type": "markdown",
            "metadata": {},
            "source": [
                "## Using `bqplot`'s interactive elements"
            ],
            "execution_count": null,
            "outputs": []
        },
        {
            "cell_type": "code",
            "execution_count": 128,
            "metadata": {},
            "outputs": [],
            "source": [
                "# Creating a new Figure and setting it's title\n",
                "plt.figure(title='My Second Chart')"
            ]
        },
        {
            "cell_type": "code",
            "execution_count": 129,
            "metadata": {},
            "outputs": [],
            "source": [
                "# Let's assign the scatter plot to a variable\n",
                "scatter_plot = plt.scatter(x_data, y_data)\n",
                "scatter_plot.y = np.cumsum(np.random.randn(size)  * 100.0)"
            ]
        },
        {
            "cell_type": "markdown",
            "metadata": {},
            "source": [
                "# Change color of plots"
            ],
            "execution_count": null,
            "outputs": []
        },
        {
            "cell_type": "code",
            "execution_count": null,
            "metadata": {},
            "outputs": [],
            "source": [
                "# Say, the color\n",
                "scatter_plot.colors = ['Red']"
            ]
        },
        {
            "cell_type": "code",
            "execution_count": null,
            "metadata": {},
            "outputs": [],
            "source": [
                "scatter_plot.colors = ['yellow']"
            ]
        },
        {
            "cell_type": "code",
            "execution_count": null,
            "metadata": {},
            "outputs": [],
            "source": []
        }
    ],
    "metadata": {
        "anaconda-cloud": {},
        "language_info": {
            "codemirror_mode": {
                "name": "ipython",
                "version": 3
            },
            "file_extension": ".py",
            "mimetype": "text/x-python",
            "name": "python",
            "nbconvert_exporter": "python",
            "pygments_lexer": "ipython3",
            "version": "3.8.1-final"
        }
    },
    "nbformat": 4,
    "nbformat_minor": 1
}
